package com.rico.deploy.service.impl;

import com.rico.deploy.entity.CourseClassRelation;
import com.rico.deploy.mapper.CourseClassRelationMapper;
import com.rico.deploy.service.CourseClassRelationService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * @author 夏智力
 * @FileName CourseClassRelationServiceImpl
 * @date 2021/5/2 17:41
 * @Software: IntelliJ IDEA
 */
public class CourseClassRelationServiceImpl implements CourseClassRelationService {
    @Autowired
    private CourseClassRelationMapper courseClassRelationmapper;
    @Override
    public List<CourseClassRelation> selectAll() {
        return courseClassRelationmapper.selectAll();
    }

    @Override
    public CourseClassRelation selectById(Integer id) {
        return courseClassRelationmapper.selectByPrimaryKey(id);
    }

    @Override
    public int insertCourseClassRelation(CourseClassRelation courseClassRelation) {
        return courseClassRelationmapper.insert(courseClassRelation);
    }

    @Override
    public int deleteCourseClassRelationById(Integer id) {
        return courseClassRelationmapper.deleteByPrimaryKey(id);
    }

    @Override
    public int updateCourseClassRelation(CourseClassRelation courseClassRelation) {
        return courseClassRelationmapper.updateByPrimaryKey(courseClassRelation);
    }
}
